﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
using WeChat.Context;
using WeChat.IReponsitory;
using WeChat.Models;

namespace WeChat.Reponsitory
{
    public class UserReponsitory : BaseReponsitory<XFUser>, IUserReponsitory
    {
        public UserReponsitory(WeChatContext content) : base(content)
        {
        }

        public IQueryable<XFUser> GetUserDetail(Expression<Func<XFUser, bool>> whereLambda)
        {
            return Context.Users
                .Include(a => a.UserExtend)
                .Where(whereLambda);
        }
    }
}
